package com.tiger.poker.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.websocket.Session;
import java.util.List;

/**
 * @author Joy on 2019/2/11 17:02
 */
@Data
@Accessors(chain = true)
public class Game21Vo {
    @JsonIgnore
    private Session session;
    private String name;
    private List<Integer> numbers;
    /**
     * The Status.
     * 0 加入游戏, 1 游戏中,2 开牌中
     */
    private int status;

    public Game21Vo() {
    }

    public Game21Vo(Session session) {
        this.session = session;
    }

    @Override
    public boolean equals(Object game21Vo) {
        if (!(game21Vo instanceof Game21Vo)) {
            return false;
        }

        return ((Game21Vo) game21Vo).session == this.session;
    }

    @Override
    public int hashCode() {
        return session == null ? 0 : session.hashCode();
    }

}
